cmake_minimum_required(VERSION 3.0)
project(MyProject)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")

file(GLOB SOURCES src/*.cpp)
file(GLOB HEADERS include/*.h)

include_directories(
    include
    /usr/local/mysql/include/mysql/
)
link_directories(/usr/local/mysql/lib/mysql)

add_executable(main ${SOURCES} ${HEADERS})

target_link_libraries(main mysqlclient pthread)